from django.conf.urls.defaults import *

urlpatterns = patterns('',
    #latestchatty
    (r'^$', 'shackapi.threads.views.listing', {'story_id': 'index', 'page': 1, 'format': 'xml'}),
    (r'^index\.(?P<format>\w+)$', 'shackapi.threads.views.listing', {'story_id': 'index', 'page':1}),
    
    #story-specific listings
    (r'^(?P<story_id>\d+)\.(?P<format>\w+)$', 'shackapi.threads.views.listing', {'page': 1}),
    (r'^(?P<story_id>\d+)\.(?P<page_number>\d+)\.(?P<format>\w+)$', 'shackapi.threads.views.listing'),
    
    #single thread
    (r'^thread/(?P<root_post_id>\d+)\.(?P<format>\w+)$', 'shackapi.threads.views.detail'),
    
    #stories
    (r'^stories', include('shackapi.stories.urls')),
    
)
